package com.meida.student.app.user.handler;

import com.meida.common.base.entity.EntityMap;
import com.meida.common.mybatis.interceptor.PageInterceptor;
import com.meida.common.mybatis.model.PageParams;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.module.bus.client.entity.BusReason;
import org.springframework.stereotype.Component;

/**
 * 售后原因list扩展
 */
@Component("ReasonListHandler")
public class ReasonListHandler implements PageInterceptor<BusReason> {

    @Override
    public void prepare(CriteriaQuery<BusReason> cq, PageParams pageParams, EntityMap params) {
        cq.clear();
        cq.select(BusReason.class, "reasonId", "reasonTitle");
        cq.orderByAsc("reasonSort");
    }

}
